import Vue from 'vue';
import VueRouter from 'vue-router';

// 导入element-ui.js
import '../utils/element-ui';

Vue.use(VueRouter);
// 注册路由（懒加载）
const routes = [
  // 登录页
  {
    path: '/login',
    component: () => import('../views/UserLogin.vue'),
  },
  {
    path: '/',
    component: () => import('../views/HomePage.vue'),
  },
  {
    path: '*',
    component: () => import('../views/NotFound.vue'),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
